package com.example.user.customviewdemo.test;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.example.user.customviewdemo.R;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class StepActivity extends AppCompatActivity {

    @Bind(R.id.next_step_button)
    Button nextStepButton;
    @Bind(R.id.pre_step_button)
    Button preStepButton;
    @Bind(R.id.step_view)
    StepView stepView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_step);
        ButterKnife.bind(this);


    }

    @OnClick({R.id.next_step_button, R.id.pre_step_button})
    public void onclick(View v) {
        switch (v.getId()) {
            case R.id.next_step_button:
                stepView.nextStep();
                break;
            case R.id.pre_step_button:
                stepView.preStep();
                break;
        }
    }
}
